package org.carl.grpc.cloud.service.b.controller;

import org.carl.grpc.cloud.service.b.service.GrpcClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * email carl.chen@bk.ru
 *
 * @Author: 陈青松
 * @Date: 2019/4/13 0:34
 */
@RestController
public class HomeController {
    @Autowired
    private GrpcClientService grpcClientService;

    @RequestMapping("/")
    String printMessage(@RequestParam(defaultValue = "LinShen") String name) {
        return grpcClientService.sendMessage(name);
    }
}
